package com.noble.imui.chatinput.listener;

import java.io.File;

/**
 * 录音的接口回调
 */
public interface RecordVoiceListener {

    /**
     * 开始录音：在接口中设置存放文件目录
     */
    void onStartRecord();

    /**
     * Fires when finished recording.
     *
     * @param voiceFile The audio file.
     * @param duration  The duration of audio file, specified in seconds.
     */
    void onFinishRecord(File voiceFile, int duration);

    /**
     * Fires when canceled recording, will delete the audio file.
     */
    void onCancelRecord();

    /**
     * 录音试听界面，点击取消按钮触发
     */
    void onPreviewCancel();

    /**
     * 录音试听界面，点击发送按钮触发
     */
    void onPreviewSend();
}